﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using APPLICATION.Properties;
using System.Data;
using System.Data.SqlClient;

namespace APPLICATION
{
    class GetConnectionString
    {

        public String connString()
        {
            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
           
           /*
            builder.DataSource = Settings.Default.ServerAdress;
            builder.InitialCatalog = Settings.Default.DatabaseName;
            builder.UserID  = Settings.Default.UserName;
            builder.Password = Settings.Default.Password;
           */


            return globals.APPCONNSTRING;
        }



        public String connStringFromLogin(String userName, String passWord)
        {
            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();

            builder.DataSource = Settings.Default.ServerAdress;
            builder.InitialCatalog = Settings.Default.DatabaseName;

            builder.UserID = userName;
            builder.Password = passWord;

            return builder.ConnectionString;
        }

  
        public String ConnectionSrting()
        {
            /*
            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();

            builder.DataSource = Settings.Default.ServerAdress;
            builder.InitialCatalog = Settings.Default.DatabaseName;

            builder.UserID = Settings.Default.UserName;
            builder.Password = Settings.Default.Password;


            return builder.ConnectionString;
             */

            return globals.APPCONNSTRING;
        }
    }


}
